package org.telluriumsource.ui.widget.dojo.builder

import demo.tellurium.framework.BaseWidgetUiObjectBuilder 
import org.telluriumsource.ui.widget.dojo.object.TextBox 


/**
 * Builder for widget CheckBox
 *
 * @author Roger Xu (roger.xu.2007@gmail.com)
 *
 * Date: Apr 21, 2010
 * 
 */
class TextBoxBuilder extends BaseWidgetUiObjectBuilder {

    @Override
    public build(Map map, Closure c) {
        //add default parameters so that the builder can use them if not specified
        def df = [:];
        TextBox widget = this.internBuild(new TextBox(), map, df);

        if (map.get(CLOCATOR) != null) {
            widget.attributes = [:].plus(map.get(CLOCATOR));
        }
        widget.defineWidget();

        return widget;
    }
}